home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / System-Boost / Workbench / Archive / XPK / xpk_Source / libraries / NONE / xpkLibNONE.h next >
C/C++ Source or Header  |  1998-11-15  |  2KB  |  61 lines

  1. #include <exec/libraries.h>
  2. #include <dos/dos.h>
  3.  
  4. /******************* $VER: xpkLib.h 1.0 (26.06.1998) ********************/
  5.  
  6. /* set XPKSUB_INCLUDEHEADER when startup code should be included at end of
  7.    this file. */
  8.  
  9. /* Here the needed variables and strings are initialized. Do not change the
  10.    format of the IDString. Only add some additional information after the
  11.    second brake. An additional $VER: string is not needed!
  12. */
  13.  
  14. #define VERSION  1            /* version of your library */
  15. #define REVISION 4            /* revision of your library */
  16. #define LIBNAME  "xpkNONE.library"
  17. #define IDSTRING "xpkNONE 1.4 (19.07.1998)\r\n"
  18.  
  19. /************************************************************************/
  20.  
  21. /* Functions xInitCode and xExitCode give you the ability to do things on
  22.    opening and closing of library. These functions are called by init
  23.    routine or by Expunge. Init is the only funtion, that is allowed to set
  24.    a value for an global variable. The library base pointer is on stack!
  25.    If xInitCode returns not zero, the init function fails and thus the
  26.    library cannot be opened!
  27.  
  28.    The xInitCode function can for example be used for processor type checks:
  29.    the <flag> place holder may be any of the following values:
  30.    CPU's: AFF_68010, AFF_68020, AFF_68030, AFF_68040
  31.    FPU's: AFF_68881, AFF_68882
  32.    NOTE: for better processors (e.g. AFF_68030) the lower bits are set also
  33.    (AFF_68020 and AFF_68010), so you only need to check one value!.
  34.    The flags for CPU and FPU can be used both with (AFF_CPU | AFF_FPU).
  35. */
  36.  
  37. /* example init function, enable when 68020 is needed */
  38. /* #define xInitCode(a) (!(a->AttnFlags & AFF_68020)) */
  39.  
  40. /* dummy defines */
  41. #define xInitCode(a)      LibReserved()
  42. #define xExitCode(a)
  43.  
  44. /* Sometimes you do not need functions LIBXpksPackReset, LIBXpksPackFree or
  45.    XpksUnpackFree. In this case you can set these dummies here:
  46. */
  47. #define LIBXpksPackFree   LibReserved
  48. #define LIBXpksPackReset  LibReserved
  49. #define LIBXpksUnpackFree LibReserved
  50.  
  51. /* This is the library base structure. */
  52. struct XpkSubBase {
  53.   struct Library    xsb_LibNode;
  54.   BPTR              xsb_SegList;
  55.   struct ExecBase * xsb_SysBase;
  56. };
  57.  
  58. #ifdef XPKSUB_INCLUDEHEADER
  59. #include "xpk/xpkLibHeader.c"
  60. #endif
  61.